package com.example.pachong.mapper;

import com.example.pachong.pojo.Ip;
import com.example.pachong.pojo.Users;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Autowired;

@Mapper
public interface IpMapper {

    @Select("select * from ip where idip = #{idip}")
    Ip selectByUid(String idip);

    @Insert("insert into ip(idip,ipcol,ipfreq) value(#{idip},#{ipcol},#{ipfreq})")
    void insertUser(Ip ip);

    @Update("update ip set ipfreq = #{ipfreq},ipcol = #{ipcol} where idip = #{idip}")
    void updateUser(Ip ip);
}
